package com.sqx.modules.orders.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.sqx.modules.app.entity.UserEntity;
import com.sqx.modules.evaluate.entity.SysEvaluate;
import com.sqx.modules.taking.entity.Game;
import com.sqx.modules.taking.entity.OrderTaking;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@ApiModel("订单表")
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Orders implements Serializable {
    @ApiModelProperty("订单id")
    @TableId(type = IdType.AUTO)
    private Long ordersId;
    @ApiModelProperty("订单编号")
    private String ordersNo;
    @ApiModelProperty("用户id")
    private Long userId;
    @TableField(exist = false)
    private UserEntity user = new UserEntity();
    @ApiModelProperty("接单id")
    private Long orderTakingId;
    @ApiModelProperty("支付金额")
    private BigDecimal payMoney;
    @ApiModelProperty("退款金额")
    private BigDecimal refundMoney;
    @ApiModelProperty("订单状态0待支付1进行中2已完成3已退款4待服务")
    private String state;
    @ApiModelProperty("创建时间")
    private String createTime;
    @ApiModelProperty("退款原因")
    private String refundContent;
    @ApiModelProperty("订单种类1接单2会员")
    private Long ordersType;
    @ApiModelProperty("备注")
    private String remarks;
    @ApiModelProperty("订单数量")
    private Long orderNumber;
    @ApiModelProperty("评分")
    private Double orderScore;
    @ApiModelProperty("修改时间")
    private String updateTime;
    @ApiModelProperty("会员类型id")
    private Long vipDetailsId;
    @ApiModelProperty("用户类型")
    private Long type;
    @ApiModelProperty("假删除")
    private Long isdelete;
    @TableField(exist = false)
    private Game game;
    /**
     * 单价
     */
    @TableField(exist = false)
    private BigDecimal money;
    @TableField(exist = false)
    private OrderTaking orderTaking;
    @ApiModelProperty("省")
    private String province;
    @ApiModelProperty("市")
    private String city;
    @ApiModelProperty("区")
    private String district;
    @ApiModelProperty("详细地址")
    private String detailsAddress;
    @ApiModelProperty("纬度")
    private String longitude;
    @ApiModelProperty("经度")
    private String latitude;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("电话")
    private String phone;
    @ApiModelProperty("上门时间")
    private String startTime;
    private Integer isRemind;
    @ApiModelProperty("技师佣金")
    private BigDecimal rate;
    @ApiModelProperty("一级佣金")
    private BigDecimal zhiRate;
    private Long zhiUserId;
    @ApiModelProperty("二级佣金")
    private BigDecimal feiRate;
    private Long feiUserId;
    @ApiModelProperty("平台利润")
    private BigDecimal pingRate;
    private Long orderTakingUserId;
    private String code;
    @ApiModelProperty("支付方式 1零钱  2微信  3支付宝")
    private Integer payWay;
    @ApiModelProperty("开始服务时间")
    private String startServiceTime;
    @ApiModelProperty("结束服务时间")
    private String endServiceTime;
    @ApiModelProperty("开始服务图片")
    private String startServiceImg;
    @ApiModelProperty("结束服务图片")
    private String endServiceImg;
    @ApiModelProperty("服务员工id")
    private Long staffUserId;
    @ApiModelProperty("开始服务经度")
    private String startServiceLongitude;
    @ApiModelProperty("开始服务纬度")
    private String startServiceLatitude;
    @ApiModelProperty("开始服务地址")
    private String startAddress;
    @ApiModelProperty("结束服务纬度")
    private String endServiceLongitude;
    @ApiModelProperty("结束服务纬度")
    private String endServiceLatitude;
    @ApiModelProperty("开始服务地址")
    private String endAddress;
    private Long serviceTimeId;
    @TableField(exist = false)
    private SysEvaluate sysEvaluate;
    @TableField(exist = false)
    private String myLevel;
    @ApiModelProperty("优惠券id")
    private Long couponId;
    @ApiModelProperty("支付总金额")
    private BigDecimal paySumMoney;
    @ApiModelProperty("退款总金额")
    private BigDecimal refundSumMoney;
    /**
     * 服务方式
     */
    private String serviceMethod;

    /**
     * 优惠金额
     */
    @TableField(exist = false)
    private BigDecimal couponMoney;
    /**
     * 是否已经补费
     */
    @TableField(exist = false)
    private Integer isRepair;
}
